home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / patches / fix32b.exe / PINSTALL.BAT < prev    next >
DOS Batch File  |  1994-03-22  |  5KB  |  191 lines

  1. @echo off
  2. echo.
  3. echo PC Tools for Windows 2.0
  4. echo March 22, 1994 Patch
  5. echo.
  6. echo      Allows DiskFix, Optimizer, Undelete, and Wipe Delete features of
  7. echo      PC Tools for Windows 2.0 to work when Windows for Workgroups 3.11
  8. echo      32-bit File Access (VFAT) is enabled.
  9. echo.
  10. echo      Copyright (C)1994 Central Point Software, Inc.
  11. echo      Portions Copyright (C)1994 Microsoft Corp.
  12. echo.
  13.  
  14. REM
  15. REM Make sure required parameters are present.
  16. REM
  17. if '%1'=='' goto BADPARAMS
  18. if '%2'=='' goto BADPARAMS
  19.  
  20. REM
  21. REM Make sure specified Windows directory is valid and contains Windows
  22. REM for Workgroups 3.11.
  23. REM
  24. chkdate %2\SYSTEM.INI
  25. if errorlevel 1 goto BADWINDOWS
  26. chkdate %2\SYSTEM\VFAT.386 /t0311
  27. if errorlevel 1 goto BADWINDOWS
  28.  
  29. REM
  30. REM Make sure specified PC Tools for Windows 2.0 directory is valid and
  31. REM contains valid version 2.0 installation.
  32. REM
  33. chkdate %1\WNCPS2.DLL /d940122 /t0200
  34. if errorlevel 3 goto CHECKGERMAN
  35. if errorlevel 1 goto BADPCTW
  36. goto CHECKLANGUAGE
  37.  
  38. :CHECKGERMAN
  39. chkdate %1\WNCPS2.DLL /d940202 /t0200
  40. if errorlevel 3 goto CHECKFRENCH
  41. if errorlevel 1 goto BADPCTW
  42. goto CHECKLANGUAGE
  43.  
  44. :CHECKFRENCH
  45. chkdate %1\WNCPS2.DLL /d940203 /t0200
  46. if errorlevel 3 goto BADPCTWVERSION
  47. if errorlevel 1 goto BADPCTW
  48. goto CHECKLANGUAGE
  49.  
  50. :CHECKLANGUAGE
  51.  
  52. REM
  53. REM Make sure at least one language directory exists.
  54. REM
  55.  
  56. if exist %1\ENGLISH\WNCPS2L.RSL goto BEGINPATCH
  57. if exist %1\GERMAN\WNCPS2L.RSL goto BEGINPATCH
  58. if exist %1\FRENCH\WNCPS2L.RSL goto BEGINPATCH
  59.  
  60. goto BADPCTWNOLANGUAGE
  61.  
  62. :BEGINPATCH
  63.  
  64. REM
  65. REM Begin patch process
  66. REM
  67.  
  68. echo.
  69. echo Patching PC Tools for Windows files....
  70. patch %1 base.rtp
  71. if not exist %1\english\wncps2l.rsl goto SYSCONFRGR
  72. patch %1 sc_us.rtp
  73. goto PATCHENGLISH
  74.  
  75. :SYSCONFRGR
  76. patch %1 sc_frgr.rtp
  77.  
  78. :PATCHENGLISH
  79. if not exist %1\english\wncps2l.rsl goto PATCHGERMAN
  80. echo Patching English language files....
  81. patch %1\english english.rtp
  82.  
  83. :PATCHGERMAN
  84. if not exist %1\german\wncps2l.rsl goto PATCHFRENCH
  85. echo Patching German language files....
  86. patch %1\german german.rtp
  87.  
  88. :PATCHFRENCH
  89. if not exist %1\french\wncps2l.rsl goto COPYVXDS
  90. echo Patching French language files....
  91. patch %1\french french.rtp
  92.  
  93. :COPYVXDS
  94. echo.
  95. echo Copying virtual device drivers to %2\SYSTEM directory....
  96. copy VFATHLP.386 %2\SYSTEM\VFATHLP.386
  97. copy CP32SUP.386 %2\SYSTEM\CP32SUP.386
  98.  
  99. :ADDTOINI
  100. echo Adding device drivers to %2\SYSTEM.INI file....
  101. addini %2\SYSTEM.INI PATCH01.INI
  102. if errorlevel 1 goto ADDINIERROR
  103. echo.
  104. echo Your old %2\SYSTEM.INI file has been renamed to
  105. echo %2\SYSTEM.PT? where ? can be a number from 0 to 9.
  106. echo.
  107.  
  108. :ENDPATCH
  109.  
  110. echo *** PATCH INSTALLATION COMPLETE ***
  111. echo.
  112.  
  113. goto END
  114.  
  115. :ADDINIERROR
  116.  
  117. echo.
  118. echo An error occurred while attempting to configure your
  119. echo %2\SYSTEM.INI file.  Your previous SYSTEM.INI file
  120. echo has been restored.  If there is a %2\SYSTEM.PTC file
  121. echo on your system, this file contains the changes that were attempted.
  122. echo.
  123. echo Possible causes for the error include:
  124. echo      PATCH01.INI does not exist in the directory containing PATCH01.BAT.
  125. echo      SYSTEM.INI is marked as a system, hidden, or read-only file.
  126. echo      The drive containing Windows is full or write-protected.
  127. echo.
  128. echo Please refer to the README file to complete the patch installation.
  129. echo.
  130.  
  131. goto END
  132.  
  133. :BADPCTWNOLANGUAGE
  134.  
  135. echo.
  136. echo No language resource directory was detected immediately under the
  137. echo specified PC Tools for Windows directory,
  138. echo %1.
  139. echo If you have placed the language files somewhere other than the default
  140. echo location, a manual patch installation is necessary.
  141.  
  142. goto BADPARAMS
  143.  
  144. :BADPCTW
  145.  
  146. echo.
  147. echo The PC Tools for Windows directory you specified,
  148. echo %1,
  149. echo does not contain a PC Tools for Windows installation.
  150.  
  151. goto BADPARAMS
  152.  
  153. :BADPCTWVERSION
  154. echo.
  155. echo The PC Tools for Windows directory you specified,
  156. echo %1,
  157. echo does not contain a version 2.0 installation.
  158.  
  159. goto BADPARAMS
  160.  
  161. :BADWINDOWS
  162.  
  163. echo.
  164. echo The Windows directory you specified,
  165. echo %2,
  166. echo is not a valid Windows directory, or it does not contain Windows for
  167. echo Workgroups 3.11.
  168.  
  169. goto BADPARAMS
  170.  
  171. :BADPARAMS
  172.  
  173. echo.
  174. echo Syntax:
  175. echo.
  176. echo    PINSTALL [PCTW2 Directory] [Windows Directory]
  177. echo.
  178. echo    Directories must be completely specified, including drive letter.
  179. echo    Do not include a trailing backslash when specifying directories.
  180. echo    e.g., PINSTALL D:\CPS D:\WINDOWS
  181. echo.
  182. echo    If you specified both directories and you are certain that the
  183. echo    directories are valid, then a manual installation of the patch may be
  184. echo    necessary.  Please refer to the README file for instructions on how to
  185. echo    perform a manual install.
  186. echo.
  187.  
  188. goto END
  189.  
  190. :END
  191.